import com.dan.mapper.UserMapper;
import com.dan.pojo.User;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @功能：
 * @版本： V1
 * @版权： 信息技术有限公司（http://www.mychery.com/）
 * @作者： 磐石战队开发组  00355760
 * @日期： 2024/9/6 14:01
 */
public class mytest {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");
        UserMapper userMapper = context.getBean("UserMapper", UserMapper.class);
        for (User user : userMapper.sUser()) {
            System.out.println(user);
        }
    }
        @Test
        public void test() {
            ApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");
            UserMapper userMapper = context.getBean("UserMapper2", UserMapper.class);
            for (User user : userMapper.sUser()) {
                System.out.println(user);
            }
    }

}
